package com.ebocy.hammer.battle.fight.message;

import com.ebocy.hammer.core.constants.GameMessageCode;
import com.ebocy.hammer.core.domain.GamePlayer;
import com.ebocy.hammer.core.message.AbstractS2CMessage;

public class S2CSwitchNomalMessage extends AbstractS2CMessage{
	private GamePlayer gamePlayer;
	public S2CSwitchNomalMessage(GamePlayer gamePlayer){
		super();
		this.gamePlayer=gamePlayer;
	}
	@Override
	protected void writeMessage() {
		writeString(String.valueOf(gamePlayer.getGamePlayerId()));
		writeShort(gamePlayer.getX());
		writeShort(gamePlayer.getY());
	}

	@Override
	public short getMessageCode() {
		return GameMessageCode.BATTLE_SWITCH_NOMAL;
	}

}
